print("Python高级特性：迭代")

print("首先，判断哪些类型可以迭代")

from collections import Iterable
print("isinstance('abc', Iterable):", isinstance('abc', Iterable))
print("isinstance([1, 2, 3], Iterable):", isinstance([1, 2, 3], Iterable))
print("isinstance(123,Iterable):", isinstance(123,Iterable))

print("使用enumerate顺带迭代索引")

t = ['a', 'b', 'c']

for i, value in enumerate(t):
	print("index:", i, "value:", value)
	
